import net.sourceforge.tess4j.Tesseract;
import net.sourceforge.tess4j.TesseractException;

import java.io.File;

public class ChePaiTest {
    public static void main(String[] args) {
        File imageFile = new File("1.png");
        Tesseract instance = new Tesseract();
        instance.setDatapath("C:\\Users\\Administrator\\Desktop\\chepai\\chepai\\tessdata");
        try {
            String result =instance.doOCR(imageFile);
            System.out.println(result);
        } catch (TesseractException e) {
            throw new RuntimeException(e);
        }
    }
}
